<?php
/**
 * Created by PhpStorm
 * User: xooooooox
 * Date: 2020/10/29 0029
 * Time: 11:40
 */

namespace app\api\model\Index;


use app\api\model\User\UserModel;
use app\api\model\VideoUser\VideoUserModel;
use think\Model;


class VideoUserComment extends Model
{

    /**
     * 表名常量
     */
    const Table = 'video_user_comment';

    /**
     * 用户
     */
    public function user()
    {
        return $this->hasOne(UserModel::class, 'id', 'uid');
    }

    /**
     * @return \think\model\relation\HasOne
     * 短视频
     */
    public function video()
    {
        return $this->hasOne(VideoUserModel::class, 'id', 'video_id');

    }
}